﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace SiteParser.Core.Configuration
{
	public class CachingConfiguration : ConfigurationElement
	{
		private const string READ_CACHE_ENABLE_PROPERTY_NAME = "readCacheEnabled";
		[ConfigurationProperty(READ_CACHE_ENABLE_PROPERTY_NAME, IsRequired = true)]
		public bool ReadCacheEnabled {
			get { return (bool)this[READ_CACHE_ENABLE_PROPERTY_NAME]; }
		}

		private const string WRITE_CACHE_ENABLED_PROPERTY_NAME = "writeCacheEnabled";
		[ConfigurationProperty(WRITE_CACHE_ENABLED_PROPERTY_NAME, IsRequired = true)]
		public bool WriteCacheEnabled {
			get { return (bool)this[WRITE_CACHE_ENABLED_PROPERTY_NAME]; }
		}

		private const string CACHE_FOLDER_PATH = "cacheFolderPath";
		[ConfigurationProperty(CACHE_FOLDER_PATH, IsRequired = true)]
		public string CacheFolderPath {
			get { return (string)this[CACHE_FOLDER_PATH]; }
		}
	}
}
